<%-- 
    Document   : managePADetails
    Created on : Sep 28, 2011, 8:38:03 PM
    Author     : s4201567 Tony Yu
--%>

<style type="text/css">
    .errors { color: red; }

    #pa-list {
        padding-left: 80px;
    }
    
    #syshome-title {
        text-align: center;
    }
    
   .sysadmintable {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    width:80%;
    border:1px solid #009933;
    text-align:center;
    }
    .sysadmintable td, .sysadmintable th .sysadmintable tr {
    font-size:1em;    
    border:1px solid #009933;
    padding:3px 7px 2px 17px;
    }
    .sysadmintable th {
    font-size:1.1em;
    text-align:center;
    padding-top:5px;
    padding-bottom:4px;
    background-color:#008833;
    color:#ffffff;
    }
    
    #back {
        padding-top:20px;
        padding-bottom:20px;
    }
</style>

<script type="text/javascript">
    function send(pid) {
         window.location="managePADetails.html?pid="+pid+"&type=2";
    }
</script>

<%@ include file="../header.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <div id="content-container1">
        <div id="content">
           <% if (request.getParameter("pid") != null) { %>
            <div id ="syshome-title">
                <h3>Manage Poll Administrator Details</h3>
            </div>    
            <% int pid = Integer.parseInt(request.getParameter("pid")); %>
            <div id="pa-list">
                <table class="sysadmintable">
                    <tr>
                        <th>Field</th>
                        <th>Details</th>
                        <th>Edit</th>
                    </tr>
                    <tr><td>Date left until Expiry</td><td>${expiry}</td><td><a href="editPADetails.html?pid=<c:out value="<%=pid%>"/>&type=<c:out value="0"/>">Edit</a></td></tr>
                    <tr><td>Email</td><td>${email}</td><td><a href="editPADetails.html?pid=<c:out value="<%=pid%>"/>&type=<c:out value="1"/>">Edit</a></td></tr>
                    <tr><td>Password</td><td>*****</td><td><input type="button" value="Send" onClick="send(<%=pid%>)"/></td></tr>
                </table>

                <div id="back">
                    <input type="button" onClick="window.location.href='../sysadmin/managePA.html'" value="Back"/>
                </div>
            </div>
            <center> 
                <font color="green"> <c:out value="${pwd}"></c:out></font>
            </center>
        </div>
        <% } else
            out.println("<p>The page was improperally formed, try going back and trying again.</p>");
        %>
    </div>	
		
<%@ include file="../footer.jsp" %>